                                             
/*
 * OrderLineBO.java
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 *
 */

package edu.byu.isys413.samlam;

/**
 * OrderLine
 * @author Brian Barrett
 */
public class OrderLine
{
    
    private String olguid;
    private PurchaseOrder order;
    private Conceptual conceptual;
    private int quantity;
    private boolean dirty = false;
    private boolean alreadyInDB = false;
    //private VendorItemBO vendoritem;
    /**
     * Creates a new instance of OrderLineBO
     * @param id id
     */
    public OrderLine(String id) {
        this.olguid = id;
    }
    
    /**
     * OrderLine Guid
     * @return OrderLine
     */
    public String getOlguid()
    {
        return olguid;
    }
    
    /**
     * get Purchase Order
     * @return purchase order
     */
    public PurchaseOrder getPurchaseOrder() {
        return order;
    }
    
    /**
     * set purchase order
     * @param order order
     */
    public void setPurchaseOrder(PurchaseOrder order) {
        this.order = order;
    }
    
    /**
     * get Conceptual
     * @return get Conceptual
     */
    public Conceptual getConceptual() {
        return conceptual;
    }
    
    /**
     * set Conceptual
     * @param conceptual conceptual
     */
    public void setConceptual(Conceptual conceptual) {
        this.conceptual = conceptual;
        this.setDirty(true);
    }
    
    /**
     * get Quantity
     * @return conceptual
     */
    public int getQuantity() {
        return quantity;
    }
    
    /**
     * set quantity
     * @param quantity quantity
     */
    public void setQuantity(int quantity) {
        this.quantity = quantity;
        this.setDirty(true);
    }

    /**
     * set to isDirty
     * @return is dirty
     */
    public boolean isDirty() {
        return dirty;
    }

    /**
     * set Dirty
     * @param dirty dirty
     */
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    /**
     * set to isAlready in Database
     * @return set to isAlreadyinDatabase
     */
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    /**
     * set Already in Database
     * @param alreadyInDB already in database
     */
    public void setAlreadyInDB(boolean alreadyInDB) {
        this.alreadyInDB = alreadyInDB;
    }
    
}